﻿using Application.UserRoleService;
using AutoMapper;
using Domain.Entity.zct;
using Domain.IRepository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.RolepermissionService
{
    public class RolePermissionService:IRolePermissionService
    {
        private readonly IRolePermissionRepository rolePermissionRepository;
        private readonly IMapper mapper;

        public RolePermissionService(IRolePermissionRepository rolePermissionRepository, IMapper mapper)
        {
            this.rolePermissionRepository = rolePermissionRepository;
            this.mapper = mapper;
        }

        public async Task<List<RolePermission>> Getpid(int pid)
        {
            // 1. 获取用户的所有角色关联记录
            List<RolePermission> rolePermissions = await rolePermissionRepository.Getpid(pid);
            return rolePermissions;
        }
    }
}
